/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pojo;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 *
 * @author pvhuy
 */
@Entity
@Table(name=DiaChi.TABLE_DIACHI)
public class DiaChi extends Base{
    public static final String TABLE_DIACHI = "DiaChi";

    protected static final String COLUMN_TENDIACHI = "TenDiaChi";
    private static final int LENGTH_TENDIACHI = 45;
    @Column(name=COLUMN_TENDIACHI, length=LENGTH_TENDIACHI, nullable=false)
    private String tenDiaChi;

    protected static final String COLUMN_QUANHUYEN = "QuanHuyen";
    private static final int LENGTH_QUANHUYEN = 45;
    @Column(name=COLUMN_QUANHUYEN, length=LENGTH_QUANHUYEN)
    private String quanHuyen;

    protected static final String COLUMN_TINHTHANHPHO = "TinhThanhPho";
    private static final int LENGTH_TINHTHANHPHO = 45;
    @Column(name=COLUMN_TINHTHANHPHO, length=LENGTH_TINHTHANHPHO)
    private String tinhThanhPho;

    protected static final String COLUMN_QUOCGIA = "QuocGia";
    private static final int LENGTH_QUOCGIA = 45;
    @Column(name=COLUMN_QUOCGIA, length=LENGTH_QUOCGIA)
    private String quocGia;

    protected static final String COLUMN_MAVUNG = "MaVung";
    private static final int LENGTH_MAVUNG = 45;
    @Column(name=COLUMN_MAVUNG, length=LENGTH_MAVUNG)
    private String maVung;

    protected static final String COLUMN_CHAULUC = "MaChauLuc";
    //@ManyToOne(cascade=CascadeType.ALL)
    @ManyToOne
    @JoinColumn(name=COLUMN_CHAULUC)
    private ChauLuc chauLuc;


    protected static final String COLUMN_DIACHIGIAOHANG = "DiaChiGiaoHang";
    private static final int LENGTH_DIACHIGIAOHANG = 45;
    @Column(name=COLUMN_DIACHIGIAOHANG, length=LENGTH_DIACHIGIAOHANG)
    private String diaChiGiaoHang;

    /**
     * @return the tenDiaChi
     */
    public String getTenDiaChi() {
        return tenDiaChi;
    }

    /**
     * @param tenDiaChi the tenDiaChi to set
     */
    public void setTenDiaChi(String tenDiaChi) {
        this.tenDiaChi = tenDiaChi;
    }

    /**
     * @return the quanHuyen
     */
    public String getQuanHuyen() {
        return quanHuyen;
    }

    /**
     * @param quanHuyen the quanHuyen to set
     */
    public void setQuanHuyen(String quanHuyen) {
        this.quanHuyen = quanHuyen;
    }

    /**
     * @return the tinhThanhPho
     */
    public String getTinhThanhPho() {
        return tinhThanhPho;
    }

    /**
     * @param tinhThanhPho the tinhThanhPho to set
     */
    public void setTinhThanhPho(String tinhThanhPho) {
        this.tinhThanhPho = tinhThanhPho;
    }

    /**
     * @return the maVung
     */
    public String getMaVung() {
        return maVung;
    }

    /**
     * @param maVung the maVung to set
     */
    public void setMaVung(String maVung) {
        this.maVung = maVung;
    }

    /**
     * @return the chauLuc
     */
    public ChauLuc getChauLuc() {
        return chauLuc;
    }

    /**
     * @param chauLuc the chauLuc to set
     */
    public void setChauLuc(ChauLuc chauLuc) {
        this.chauLuc = chauLuc;
    }

    public String getQuocGia() {
        return quocGia;
    }

    public void setQuocGia(String quocGia) {
        this.quocGia = quocGia;
    }

    public String getDiaChiGiaoHang() {
        return diaChiGiaoHang;
    }

    public void setDiaChiGiaoHang(String diaChiGiaoHang) {
        this.diaChiGiaoHang = diaChiGiaoHang;
    }


}
